#! /usr/bin/env bash
echo "Global settings"

source "$myHERE/../pris/__osx.pri"

myOSXBUILDSUBDIR="OSX/$myOSX-$myOSXSTDLIBPATHCOMPONENT/"

myOSXSDKDIR="/Applications/Développement/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$myOSX.sdk"

my3RDINSTALLDIR="$myHERE/Install/$myOSXBUILDSUBDIR"
mkdir -p "$my3RDINSTALLDIR"

my3RDINCLUDEDIR="$my3RDINSTALLDIR/include"
my3RDLIBRARYDIR="$my3RDINSTALLDIR/lib"
my3RDBINDIR="$my3RDINSTALLDIR/bin"

mkdir -p "$my3RDINCLUDEDIR"
mkdir -p "$my3RDLIBRARYDIR"
mkdir -p "$my3RDBINDIR"

myCFLAGS="-arch x86_64 -isysroot $myOSXSDKDIR -mmacosx-version-min=$myOSX -I$my3RDINCLUDEDIR"
myCXXFLAGS="$myCFLAGS -stdlib=$myOSXSTDLIB --std=$myOSXCC"

myLDFLAGS="-stdlib=$myOSXSTDLIB -Wl,-syslibroot,$myOSXSDKDIR -L$my3RDLIBRARYDIR"

function mySetupBUILDDIR {
	myBUILDDIR="$myHERE/Build/$myOSXBUILDSUBDIR/$1"
	myLOGDIR="$myBUILDDIR/Log"
	mkdir -p "$myLOGDIR"
}

function myEval {
	eval echo -e "$1"
	eval "$1"
}
echo "Done"

# 1 ) 10.9 + libc++
